<?php

/**
* A DHTML menu component for joomla/mambo
* @version 1.5.0
* @package ngmenu
* @copyright (C) 2004 - 2012 by Georg Lorenz
* @license Released under the terms of the GNU General Public License
**/

/** ensure this file is being included by a parent file */
defined( '_JEXEC' ) or die( 'Restricted access' );

/**
* @package Joomla
* @subpackage ngmenu
*/

/* $updates[101][] = 	"ALTER TABLE `#__ngmenu` ADD `sm_collapse` TINYINT(1) NOT NULL AFTER `effect_shadow_main`";
$updates[101][] = 	"ALTER TABLE `#__ngmenu` ADD `sm_align` VARCHAR(50) NOT NULL AFTER `menu_align`";
$updates[101][] = 	"ALTER TABLE `#__ngmenu` ADD `keystrokes_support_create` TINYINT(1) NOT NULL AFTER `sm_collapse`";
$updates[101][] = 	"ALTER TABLE `#__ngmenu` ADD `keystrokes_support_key` SMALLINT(3) NOT NULL AFTER `keystrokes_support_create`";
$updates[103][] = 	"ALTER TABLE `#__ngmenu` ADD `update_config` TINYINT(1) NOT NULL AFTER `keystrokes_support_key`";
$updates[103][] = 	"ALTER TABLE `#__ngmenu_item` ADD `ng_id` VARCHAR(12) NOT NULL AFTER `parent_id`";
$updates[111][] = 	"ALTER TABLE `#__ngmenu` ADD `parent_itemid` INT(11) NOT NULL AFTER `module_id`";
$updates[112][] = 	"ALTER TABLE `#__ngmenu` ADD `hide_flash` TINYINT(1) NOT NULL AFTER `update_config`";
$updates[112][] = 	"UPDATE #__ngmenu SET hide_flash='1'";
$updates[112][] = 	"UPDATE #__ngmenu SET update_config='1'";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_item` DROP `ng_id`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` DROP `separator_create`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `main_separator_create` TINYINT(1) NOT NULL AFTER `submenu_height`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `sub_separator_create` TINYINT(1) NOT NULL AFTER `main_separator_create`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_create` TINYINT(1) NOT NULL AFTER `hide_flash`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_submenu` VARCHAR(50) NOT NULL AFTER `css_create`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_item_normal` VARCHAR(50) NOT NULL AFTER `css_submenu`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_item_over` VARCHAR(50) NOT NULL AFTER `css_item_normal`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_label_normal` VARCHAR(50) NOT NULL AFTER `css_item_over`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu` ADD `css_label_over` VARCHAR(50) NOT NULL AFTER `css_label_normal`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `css_submenu` VARCHAR(50) NOT NULL AFTER `item_padding`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_item_normal` VARCHAR(50) NOT NULL AFTER `sub_arrow_image_over`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_item_over` VARCHAR(50) NOT NULL AFTER `css_item_normal`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_label_normal` VARCHAR(50) NOT NULL AFTER `css_item_over`";
$updates[120][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_label_over` VARCHAR(50) NOT NULL AFTER `css_label_normal`";
$updates[121][] = 	"ALTER TABLE `#__ngmenu` ADD `regular_menu` TINYINT(1) NOT NULL AFTER `css_label_over`";
$updates[122][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `is_tabular` TINYINT(1) NOT NULL AFTER `css_submenu`";
$updates[122][] = 	"UPDATE #__ngmenu_smstyle SET is_tabular='1'";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `css_file` VARCHAR(50) NOT NULL AFTER `css_create`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `menu_height` VARCHAR(10) NOT NULL AFTER `menu_width_unit`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `effect_trans_duration2` SMALLINT(4) NOT NULL AFTER `effect_trans_duration`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `item_padding_top` SMALLINT(2) NOT NULL AFTER `item_spacing`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `item_padding_right` SMALLINT(2) NOT NULL AFTER `item_padding_top`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `item_padding_bottom` SMALLINT(2) NOT NULL AFTER `item_padding_right`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `item_padding_left` SMALLINT(2) NOT NULL AFTER `item_padding_bottom`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` DROP `item_padding`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `item_padding_top` SMALLINT(2) NOT NULL AFTER `item_spacing`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `item_padding_right` SMALLINT(2) NOT NULL AFTER `item_padding_top`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `item_padding_bottom` SMALLINT(2) NOT NULL AFTER `item_padding_right`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu_smstyle` ADD `item_padding_left` SMALLINT(2) NOT NULL AFTER `item_padding_bottom`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu_smstyle` DROP `item_padding`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `separator_padding_top` SMALLINT(2) NOT NULL AFTER `separator_vheight_unit`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `separator_padding_right` SMALLINT(2) NOT NULL AFTER `item_padding_top`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `separator_padding_bottom` SMALLINT(2) NOT NULL AFTER `item_padding_right`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `separator_padding_left` SMALLINT(2) NOT NULL AFTER `item_padding_bottom`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `rtl` TINYINT(1) NOT NULL AFTER `sm_align`";
$updates[130][] = 	"ALTER TABLE `#__ngmenu` ADD `show_active_state` TINYINT(1) NOT NULL AFTER `regular_menu`";
$updates[130][] = 	"UPDATE #__ngmenu SET show_active_state='1'";
$updates[131][] = 	"ALTER TABLE `#__ngmenu_item` ADD `default_icon` TINYINT(1) NOT NULL AFTER `icon_over`";
$updates[131][] = 	"ALTER TABLE `#__ngmenu_item` ADD `default_istyle` TINYINT(1) NOT NULL AFTER `default_icon`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `main_arrow_image_active` VARCHAR( 255 ) NOT NULL AFTER `main_arrow_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `sub_arrow_image_active` VARCHAR( 255 ) NOT NULL AFTER `sub_arrow_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `item_back_color_active` VARCHAR( 10 ) NOT NULL AFTER `item_back_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `item_back_image_active` VARCHAR( 255 ) NOT NULL AFTER `item_back_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `item_border_style_active` VARCHAR( 10 ) NOT NULL AFTER `item_border_style_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `item_border_color_active` VARCHAR( 10 ) NOT NULL AFTER `item_border_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `font_color_active` VARCHAR( 10 ) NOT NULL AFTER `font_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `font_decoration_active` VARCHAR( 20 ) NOT NULL AFTER `font_decoration_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `css_item_active` VARCHAR( 50 ) NOT NULL AFTER `css_item_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu` ADD `css_label_active` VARCHAR( 50 ) NOT NULL AFTER `css_label_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_item` ADD `icon_active` VARCHAR( 255 ) NOT NULL AFTER `icon_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `back_color_active` VARCHAR( 10 ) NOT NULL AFTER `back_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `border_style_active` VARCHAR( 10 ) NOT NULL AFTER `border_style_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `border_color_active` VARCHAR( 10 ) NOT NULL AFTER `border_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `fnt_color_active` VARCHAR( 10 ) NOT NULL AFTER `fnt_color_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `fnt_decoration_active` VARCHAR( 20 ) NOT NULL AFTER `fnt_decoration_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `back_image_active` VARCHAR( 255 ) NOT NULL AFTER `back_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `main_arrow_image_active` VARCHAR( 255 ) NOT NULL AFTER `main_arrow_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `sub_arrow_image_active` VARCHAR( 255 ) NOT NULL AFTER `sub_arrow_image_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_item_active` VARCHAR( 50 ) NOT NULL AFTER `css_item_over`";
$updates[132][] = 	"ALTER TABLE `#__ngmenu_itemstyle` ADD `css_label_active` VARCHAR( 50 ) NOT NULL AFTER `css_label_over`";
$updates[132][] = 	"UPDATE #__ngmenu SET hide_flash='0'";
$updates[132][] = 	"UPDATE #__ngmenu SET css_item_active='ngitem-active'";
$updates[132][] = 	"UPDATE #__ngmenu SET css_label_active='ngtext-active'";
$updates[132][] = 	"UPDATE #__ngmenu_itemstyle SET css_item_active='ngmainitem-active'";
$updates[132][] = 	"UPDATE #__ngmenu_itemstyle SET css_label_active='ngmaintext-active'";
$updates[133] = 	array();
$errors = array();
	
$query = "UPDATE #__components SET admin_menu_img = '../administrator/components/com_ngmenu/images/ngmenu.png'"
	   . "\n WHERE admin_menu_link = 'option=com_ngmenu'";
$database->setQuery($query);
$database->query();

$query = "SELECT version FROM #__ngmenu_config";
$database->setQuery($query);
$row = $database->loadObjectList(); */
?>